home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Educ / Health-Food / Recipe 1.1 Demo.sit / Recipe Master Demo / Recipe Master Demo / card_22407.txt < prev    next >
Encoding:
Text File  |  1994-08-09  |  2.5 KB  |  115 lines

  1. -- card: 22407 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 14765
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on plotFats sat,mono,poly,total
  8.   global oldLevel
  9.   get the userLevel
  10.   put it into oldLevel
  11.   set the userLevel to 5
  12.   reset paint
  13.   put 156 into x
  14.   put 173 into y
  15.   choose oval tool
  16.   set centered to true
  17.   drag from x,y to x+100,y+100
  18.   set centered to false
  19.   choose line tool
  20.   drag from x,y to x, y-100
  21.   put pi/2 into oldAngle
  22.   repeat with n = 1 to 3
  23.     get param(n)
  24.     put it/total into it
  25.     put it*2*pi into z
  26.     put oldAngle - z into angle
  27.     put oldAngle - z/2 into halfAngle
  28.     put round(x + 100 * cos(angle)) into newx
  29.     put round(y - 100 * sin(angle)) into newy
  30.     choose line tool
  31.     drag from x,y to newx,newy
  32.     set the pattern to 2 + 10 * (n-1)
  33.     if oldAngle - angle > .035 then
  34.       choose bucket tool
  35.       set the pattern to 2 + 10 * (n-1)
  36.       put round(x + 95 * cos(halfAngle)) into newx
  37.       put round(y - 95 * sin(halfAngle)) into newy
  38.       click at newx,newy
  39.     end if
  40.     put angle into oldAngle
  41.   end repeat
  42.   choose browse tool
  43.   repeat with n = 1 to 3
  44.     get param(n)
  45.     put it into data
  46.     put formatNum(data) into field (n+1)
  47.   end repeat
  48. end plotFats
  49.  
  50.  
  51.  
  52. -- part 4 (field)
  53. -- low flags: 01
  54. -- high flags: 0001
  55. -- rect: left=279 top=214 right=245 bottom=366
  56. -- title width / last selected line: 0
  57. -- icon id / first selected line: 0 / 0
  58. -- text alignment: 0
  59. -- font id: 3
  60. -- text size: 12
  61. -- style flags: 0
  62. -- line height: 16
  63. -- part name: 
  64.  
  65.  
  66. -- part 7 (button)
  67. -- low flags: 00
  68. -- high flags: 2000
  69. -- rect: left=462 top=307 right=334 bottom=494
  70. -- title width / last selected line: 0
  71. -- icon id / first selected line: 2162 / 2162
  72. -- text alignment: 1
  73. -- font id: 0
  74. -- text size: 12
  75. -- style flags: 0
  76. -- line height: 16
  77. -- part name: Return
  78. ----- HyperTalk script -----
  79. on mouseUp
  80.   global oldLevel
  81.   set the cursor to 4
  82.   choose select tool
  83.   doMenu "Select All"
  84.   doMenu "Clear Picture"
  85.   choose browse tool
  86.   repeat with n = 2 to 5
  87.     put empty into field n
  88.   end repeat
  89.   put empty into field "Date"
  90.   put empty into field "Name"
  91.   set the textsize of field "Name" to 12
  92.   set the textsize of field "Date" to 12
  93.   visual effect iris close slowly
  94.   pop card
  95.   set the userLevel to oldLevel
  96. end mouseUp
  97.  
  98.  
  99.  
  100.  
  101. -- part contents for background part 2
  102. ----- text -----
  103. Composition of Dietary Fatty Acids
  104.  
  105. -- part contents for background part 9
  106. ----- text -----
  107. Saturated Fat
  108.  
  109. Mono-Unsaturated
  110.  
  111. Poly-Unsaturated
  112.  
  113. -- part contents for background part 8
  114. ----- text -----
  115. Distribution of Fats (g)